<?
include "../compiled/dump.inc.php";

/* 
*	SOAP example Using PHP Soap Extension:
*	http://php.net/manual/en/ref.soap.php
*	
*/
$param=array(   
	"style" => SOAP_RPC,
	"use" => SOAP_ENCODED,
	"soap_version" => SOAP_1_1,
	"uri"=>"urn:myWS"
);
$soap["Core"] = new SoapClient("http://192.168.238.130/addressdb/index.php?soap=Core.wsdl",$param);

$args = array(
	"username"=>"admin",
	"password"=>sha1("admin")
);

$Login=$soap["Core"]->__soapCall("login",$args);

echo "<pre>";
print_r($Login);
echo "</pre>";

$soap["User"] = new SoapClient("http://192.168.238.130/addressdb/index.php?soap=User.wsdl",$param);

$args = array(
	"Credentials"=>$Login->Credentials
);

// Call to a SOAP function using the __soapCall Method:
echo "<pre>";
print_r($soap["User"]->__soapCall("GetUsers",$args));
echo "</pre>";

// Alternative Call to a SOAP function:
echo "<pre>";
print_R($soap["User"]->GetUsers($Login->Credentials));
echo "</pre>";

?>